from my_typing import *


class ProcessHandler:
    @staticmethod
    @overload
    def process(data: str) -> str:
        ...

    @staticmethod
    @overload
    def process(data: int) -> str:
        ...

    @staticmethod
    @overload
    def process(data: list) -> str:
        ...

    @staticmethod
    def process(data: str | int | list) -> str:
        """实际实现"""
        if isinstance(data, str):
            return f"处理字符串: {data}"

        elif isinstance(data, int):
            return f"处理整数: {data}"

        elif isinstance(data, list):
            return f"处理列表: {len(data)} 个元素"

        raise TypeError(f"不支持的数据类型: {type(data)}")
